package com.example.tnot.Teacher.MinePart.InternalFragment.Setting;

import android.annotation.SuppressLint;
import android.os.Bundle;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import androidx.navigation.NavController;
import androidx.navigation.Navigation;

import com.example.tnot.R;
import com.example.tnot.Teacher.BaseFragment.BaseBackFragment;

public class setFragment extends BaseBackFragment {
    private static final String ARG_PARAM1 = "param1";
    private static final String ARG_PARAM2 = "param2";
    private String mParam1;
    private String mParam2;
    ImageView ib_back;
    LinearLayout ll_accountManage,ll_defaultSetting;

    View view;

    public setFragment() {
        // Required empty public constructor
    }

    @Override
    public void onResume() {
        super.onResume();
        hideBottomNavigation();
    }



    public static setFragment newInstance(String param1, String param2) {
        setFragment fragment = new setFragment();
        Bundle args = new Bundle();
        args.putString(ARG_PARAM1, param1);
        args.putString(ARG_PARAM2, param2);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mParam1 = getArguments().getString(ARG_PARAM1);
            mParam2 = getArguments().getString(ARG_PARAM2);
        }
    }

    @SuppressLint("MissingInflatedId")
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.mine_set_fragment, container, false);
        InitViews();
        setListener();

        return view;
    }



    private void InitViews() {
        ib_back = view.findViewById(R.id.back);
        ll_accountManage = view.findViewById(R.id.ll_accountManage);
        ll_defaultSetting = view.findViewById(R.id.ll_defaultSetting);
    }
    private void setListener() {

        ib_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                handleBackPressed();
            }
        });
        ll_accountManage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                NavController navController = Navigation.findNavController(v);
                navController.navigate(R.id.action_setFragment_to_accountManageFragment);

            }
        });
        ll_defaultSetting.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                NavController navController = Navigation.findNavController(v);
                navController.navigate(R.id.action_setFragment_to_defaultSettingFragment);
            }
        });
    }


}